﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Zj.HttpCodeDemo.ConsoleApp.CodeFirst.Core
{
    /// <summary>
    /// Conceptual model user.
    /// </summary>
    [Table("User",Schema ="dbo")]
    public class User
        :Entity
    {
        public User()
        {
            this.UserLoginErrLogs = new HashSet<UserLoginErrLog>();
        }

        [Required]
        [MaxLength(16)]
        public string UserName { get; set; }
        [Required,MaxLength(32)]
        public string Password { get; set; }
        public int Age { get; set; }

        public virtual HashSet<UserLoginErrLog> UserLoginErrLogs{ get; set; }
    }
}
